﻿#ifndef MAINTITLE_H
#define MAINTITLE_H

#include <QLabel>
#include <QPoint>
#include <QWidget>
#include <QMouseEvent>
#include <QHBoxLayout>
#include <QPushButton>
#include <QApplication>

#include "gui/element/controlbasebutton.h"

class qmainTitle : public QWidget
{
    Q_OBJECT
public:     /*function*/
    explicit qmainTitle(QWidget *parent = 0);
protected:  /*function*/
    virtual void mousePressEvent(QMouseEvent *);
    virtual void mouseMoveEvent(QMouseEvent *);
    virtual void mouseReleaseEvent(QMouseEvent *);
    virtual void mouseDoubleClickEvent(QMouseEvent *);
private:    /*function*/

signals:
    void showMin();
    void showMax();
private slots:

public slots:

public:

protected:

private:
    QPoint  pressedPoint;   /*鼠标按下去的点*/
    bool    isMove;         /*是否正在移动*/

    QLabel      *lbProject; /*工程名称*/
    QLabel      *lbFilePath;/*文件路径显示*/
    QPushButton *btnMin;    /*最小化按钮*/
    QPushButton *btnMax;    /*最大化还原按钮*/
    QPushButton *btnClose;  /*关闭按钮*/
};

#endif // MAINTITLE_H
